#include "BaseFeature.h"

BaseFeature::BaseFeature()
{
    shapeId = -1;
    location = gp_Pnt();
}

BaseFeature::~BaseFeature()
{
}

Standard_Integer BaseFeature::getShapeId()
{
    return shapeId;
}

void BaseFeature::setShapeId(Standard_Integer shapeId)
{
    this->shapeId = shapeId;
}

gp_Pnt BaseFeature::getLocation()
{
    return location;
}

void BaseFeature::setLocation(gp_Pnt location)
{
    this->location = location;
}

void BaseFeature::DeleteOperation(BaseFeature* feature)
{
    //从list中找到要删除的feature
    for (auto it = operationList.begin(); it != operationList.end(); it++)
    {
        if (feature == *it)
        {
            operationList.remove(*it);
            return;
        }
    }
}

void BaseFeature::AddOperationToList(BaseFeature* operation)
{
    operationList.push_back(operation);
}

std::list<BaseFeature*> BaseFeature::GetOperationList()
{
    return this->operationList;
}
